﻿package mortal.game.view.copy.crossMainCity
{
    import flash.events.*;
    import mortal.game.events.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.mvc.core.*;

    public class MainCityBattleIcon extends ActionBaseIcon
    {
        private static var _instance:MainCityBattleIcon;

        public function MainCityBattleIcon()
        {
            super(ImagesConst.MainCityBattleIcon_upSkin);
            return;
        }// end function

        override protected function clickHandler(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.MainCityModuleOpenCurEnterPage));
            return;
        }// end function

        public static function hasShowingIcon() : Boolean
        {
            if (_instance == null || _instance.isHide)
            {
                return false;
            }
            return true;
        }// end function

        public static function get instance() : MainCityBattleIcon
        {
            if (_instance == null)
            {
                _instance = new MainCityBattleIcon;
            }
            return _instance;
        }// end function

    }
}
